#@layout()
#define main()
<h1>航班管理&nbsp;&nbsp;
    #if(session.user.role==2)
    <a href="/flighttime/add">创建航班</a>
    #end
</h1>
#include("_search.html")
<div class="table_box">
    <table class="list">
        <tbody>
        <tr>
            <th width="4%" style="text-align:center;">id</th>
            <th width="10%" style="text-align:center;">航班编号</th>
            <th width="10%" style="text-align:center;">飞机编号</th>
            <th width="13%" style="text-align:center;">航班开始时间</th>
            <th width="13%" style="text-align:center;">航班结束时间</th>
            <th width="10%" style="text-align:center;">航班起点</th>
            <th width="10%" style="text-align:center;">航班终点</th>
            <th width="10%" style="text-align:center;">距离路程</th>
            <th width="10%" style="text-align:center;">审核状态</th>
            <th width="20%" style="text-align:center;">操作</th>
        </tr>

        #for(x : flighttimePage.getList())
        <tr>
            <td style="text-align:center;">#(x.id)</td>
            <td style="text-align:center;">#(x.flighttimeno)</td>
            <td style="text-align:center;">#(x.airno)</td>
            <td style="text-align:center;">#(x.begindate)</td>
            <td style="text-align:center;">#(x.enddate)</td>
            <td style="text-align:center;">#(x.begin)</td>
            <td style="text-align:center;">#(x.end)</td>
            <td style="text-align:center;">#(x.distance)</td>
            <td style="text-align:center;">
                #if(x.verify==0)
                   未审核
                #else
                   已审核
                #end
            </td>
            <td style="text-align:center;">
                #if(session.user.role==2)
                &nbsp;<a href="/flighttime/delete/#(x.id)">删除</a>
                &nbsp;<a href="/flighttime/edit/#(x.id)">修改</a>
                #end
                #if(x.verify==0 && session.user.role==1)
                &nbsp;<a href="/flighttime/verify/#(x.id)">审核</a>
                #end
            </td>
        </tr>
        #end
        </tbody>
    </table>
    #@paginate(flighttimePage.pageNumber, flighttimePage.totalPage, "/flighttime/")
</div>
#end